<template>
  <div class="home">
    <el-image
      style="width: 100px; height: 100px"
      :src="require('@/assets/logo.png')"
       ></el-image>
    <HelloWorld msg="Welcome to Your Vue.js App"/>
    <el-row>
      <el-button @click="openNotification">打开通知界面</el-button>
      <el-button type="success" @click="openCalendarWindow">打开日历</el-button>
    </el-row>
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from '@/components/HelloWorld.vue'
// const path=require('path')
const { ipcRenderer } = require('electron')
export default {
  name: 'Home',
  mounted () {
    this.changeWindowSize()
  },
  methods: {
    changeWindowSize () {
      ipcRenderer.send('changWindowSize')
    },
    openCalendarWindow () {
      ipcRenderer.send('openCalendarWindow')
    },
    openNotification () {
      ipcRenderer.send('openNotificationWindow')
    }
  },
  components: {
    HelloWorld
  }
}
</script>
<style scoped>
</style>
